#coding:utf-8
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker

HOSTNAME='39.108.172.126'
PORT='33060'
DATABASE='tornado_test_002'
USERNAME='develop'
PASSWORD='yangfan666'
DB_URL='mysql+pymysql://{}:{}@{}:{}/{}?charset=utf8'.format(
    USERNAME,
    PASSWORD,
    HOSTNAME,
    PORT,
    DATABASE
)

engine=create_engine(DB_URL,echo=False)

Session=sessionmaker(bind=engine)

dbSession=Session()

Base=declarative_base(engine)